import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listRecord(query) {
  return request({
    url: '/order/record/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getRecord(id) {
  return request({
    url: '/order/record/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addRecord(data) {
  return request({
    url: '/order/record',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateRecord(data) {
  return request({
    url: '/order/record/put',
    method: 'post',
    data: data
  })
}

/**
 * 取消订单
 * @param id
 * @returns {*}
 */
export function cancelOrder(id) {
  return request({
    url: '/payment/pay-list/cancel/' + id,
    method: 'post',
  })
}

/**
 * 申请退款
 * @returns {*}
 * @param data
 */
export function refundOrder(data) {
  return request({
    url: '/payment/pay-list/refund',
    method: 'post',
    data: data
  })
}


// 删除【请填写功能名称】
export function delRecord(id) {
  return request({
    url: '/order/record/' + id + '/delete',
    method: 'post'
  })
}
